*******************************************************************************
*Flick Witzig, Martina & Adrian Vatter, 2024: Do Long Constitutions Really 
*Hamper Economic Perfor-mance? A Comment on Tsebelis and Nardi (2016a). 
*In: Research and Politics*
********************************************************************************

*This do-file provides the code to estimate the results reported in the 
*contribution



*Variable labeling*
label var log_constitutional_length "Constitutional length (log.)"
label var number_amendments_democracy "Number of amendments"
label var amendment_frequency "Amendment frequency"
label var detail "Detail"
label var  soc_trust_wvs "Generalized social trust"
label var  growth "Average annual growth"
label var education "Education"
label var natural_resources "Natural Resources"
label var trade "Trade Openness"
label var investment "Investments"
label var wgi_coc "Corruption (WGI)"
label var savings "Savings"
label var corruption_ti_cpi "Corruption (CPI)"
label var government_consumption "Gov. Comsuption"
label var amend_1990_2014 "Number of amendments 1990 to 2014"

*Generate new variables*
gen log_gdp_pc_maddison = log(gdp_pc_maddison)

gen log_gdp_pc_2015_2018 = log(gdp_pc_2015_2018)


******************************************************************
*Models of Table A.1 (TN's table 4) with sensititivy analyses
*Model Table A.1 (1)
regress log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment wgi_coc, vce(robust)
estimates store TN4_1

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment wgi_coc, treat(log_constitutional_length)

*Model Table A.1 (1a): divergent control variable
regress log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency ///
education natural_resources trade investment wgi_coc, vce(robust)
estimates store TN4_1a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency ///
education natural_resources trade investment wgi_coc, treat(log_constitutional_length)

*Model Table A.1 (1b): alternative dependent variable
regress growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment wgi_coc, vce(robust)
estimates store TN4_1b

sensemakr growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment wgi_coc, treat(log_constitutional_length)

*Model Table A.1 (1c): alternative period of analysis
regress log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade investment wgi_coc, vce(robust)
estimates store TN4_1c

sensemakr log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade investment wgi_coc, treat(log_constitutional_length)

*Model Table A.1 (2)
regress log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings wgi_coc, vce(robust)
estimates store TN4_2

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings wgi_coc, treat(log_constitutional_length)

*Model Table A.1 (2a)
regress log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency ///
education natural_resources trade savings wgi_coc, vce(robust)
estimates store TN4_2a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency ///
education natural_resources trade savings wgi_coc, treat(log_constitutional_length)

*Model Table A.1 (2b)
regress growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings wgi_coc, vce(robust)
estimates store TN4_2b

sensemakr growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings wgi_coc, treat(log_constitutional_length)

*Model Table A.1 (2c)
regress log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade savings wgi_coc, vce(robust)
estimates store TN4_2c

sensemakr log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade savings wgi_coc, treat(log_constitutional_length)

*Model Table A.1 (3)
regress log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment corruption_ti_cpi, vce(robust)
estimates store TN4_3

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment corruption_ti_cpi, treat(log_constitutional_length)

*Model Table A.1 (3a)
regress log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency  ///
education natural_resources trade investment corruption_ti_cpi, vce(robust)
estimates store TN4_3a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency  ///
education natural_resources trade investment corruption_ti_cpi, treat(log_constitutional_length)

*Model Table A.1 (3b)
regress growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment corruption_ti_cpi, vce(robust)
estimates store TN4_3b

sensemakr growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment corruption_ti_cpi, treat(log_constitutional_length)

*Model Table A.1 (3c)
regress log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade investment corruption_ti_cpi, vce(robust)
estimates store TN4_3c

sensemakr log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade investment corruption_ti_cpi, treat(log_constitutional_length)

*Model Table A.1 (4)
regress log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings corruption_ti_cpi, vce(robust)
estimates store TN4_4

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings corruption_ti_cpi, treat(log_constitutional_length)

*Model Table A.1 (4a)
regress log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency  ///
education natural_resources trade savings corruption_ti_cpi, vce(robust)
estimates store TN4_4a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency  ///
education natural_resources trade savings corruption_ti_cpi, treat(log_constitutional_length)

*Model Table A.1 (4b)
regress growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings corruption_ti_cpi, vce(robust)
estimates store TN4_4b

sensemakr growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings corruption_ti_cpi, treat(log_constitutional_length)

*Model Table A.1 (4c)
regress log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade savings corruption_ti_cpi, vce(robust)
estimates store TN4_4c

sensemakr log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade savings corruption_ti_cpi, treat(log_constitutional_length)

*Model Table A.1 (5)
regress log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment government_consumption, vce(robust)
estimates store TN4_5

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment government_consumption, treat(log_constitutional_length)

*Model Table A.1 (5a)
regress log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency  ///
education natural_resources trade investment government_consumption, vce(robust)
estimates store TN4_5a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency  ///
education natural_resources trade investment government_consumption, treat(log_constitutional_length)

*Model Table A.1 (5b)
regress growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment government_consumption, vce(robust)
estimates store TN4_5b

sensemakr growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade investment government_consumption, treat(log_constitutional_length)

*Model Table A.1 (5c)
regress log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade investment government_consumption, vce(robust)
estimates store TN4_5c

sensemakr log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade investment government_consumption, treat(log_constitutional_length)

*Model Table A.1 (6)
regress log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings government_consumption, vce(robust)
estimates store TN4_6

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings government_consumption, treat(log_constitutional_length)

*Model Table A.1 (6a)
regress log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency  ///
education natural_resources trade savings government_consumption, vce(robust)
estimates store TN4_6a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length amendment_frequency  ///
education natural_resources trade savings government_consumption, treat(log_constitutional_length)

*Model Table A.1 (6b)
regress growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings government_consumption, vce(robust)
estimates store TN4_6b

sensemakr growth log_constitutional_length number_amendments_democracy ///
education natural_resources trade savings government_consumption, treat(log_constitutional_length)

*Model Table A.1 (6c)
regress log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade savings government_consumption, vce(robust)
estimates store TN4_6c

sensemakr log_gdp_pc_2015_2018 log_constitutional_length amend_1990_2014 ///
education natural_resources trade savings government_consumption, treat(log_constitutional_length)

*Export results*
 etable, column(index) estimates(TN4_1 TN4_1a  TN4_1b TN4_1c TN4_2 TN4_2a TN4_2b  ///
 TN4_2c TN4_3 TN4_3a TN4_3b TN4_3c) keep(log_constitutional_length number_amendments_democracy amendment_frequency amend_1990_2014) cstat(_r_b, nformat(%5.3f)) cstat(_r_se, nformat(%5.3f)) mstat(r2) showstars showstarsnote export(TN_Table4_p1.docx, replace)
  
 etable, column(index) estimates(TN4_4 TN4_4a  TN4_4b TN4_4c TN4_5 TN4_5a TN4_5b ///
 TN4_5c TN4_6 TN4_6a TN4_6b TN4_6c) keep(log_constitutional_length number_amendments_democracy amendment_frequency amend_1990_2014) cstat(_r_b, nformat(%5.3f)) cstat(_r_se, nformat(%5.3f)) mstat(r2) showstars showstarsnote export(TN_Table4_p2.docx, replace)
 
*Coefficient plots for models in table A.1*
 coefplot TN4_1   TN4_1a TN4_1b TN4_1c, keep(log_constitutional_length /// 
 number_amendments_democracy  amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
 "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 4 (1)") ///
 note("Controls: education, natural resources, trade openness, investment, corruption (wgi)", span)
  graph export TN4_1.pdf , replace
 graph export TN4_1.emf , replace
 
  coefplot TN4_2   TN4_2a  TN4_2b TN4_2c, keep(log_constitutional_length ///      
  number_amendments_democracy amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
   "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 4 (2)") ///
 note("Controls: education, natural resources, trade openness, savings, corruption (wgi)", span)
   graph export TN4_2.pdf , replace
 graph export TN4_2.emf , replace
 
  coefplot TN4_3   TN4_3a TN4_3b TN4_3c, keep(log_constitutional_length ///  
  number_amendments_democracy  amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
 "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 4 (3)") ///
 note("Controls: education, natural resources, trade openness, investment, corruption (cpi)", span)
   graph export TN4_3.pdf , replace
 graph export TN4_3.emf , replace
 
  coefplot TN4_4   TN4_4a TN4_4b TN4_4c, keep(log_constitutional_length /// 
   number_amendments_democracy ///
 amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
  "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 4 (4)") ///
 note("Controls: education, natural resources, trade openness, savings, corruption (cpi)", span)
   graph export TN4_4.pdf , replace
 graph export TN4_4.emf , replace
 
  coefplot TN4_5   TN4_5a  TN4_5b TN4_5c, keep(log_constitutional_length /// 
  number_amendments_democracy amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
   "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 4 (5)") ///
 note("Controls: education, natural resources, trade openness, investment, government consumption", span)
   graph export TN4_5.pdf , replace
 graph export TN4_5.emf , replace
 
  coefplot TN4_6   TN4_6a TN4_6b TN4_6c , keep(log_constitutional_length ///  
  number_amendments_democracy  amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var."   "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 4 (6)") ///
 note("Controls: education, natural resources, trade openness, savings, government consumption", span)
   graph export TN4_6.pdf , replace
 graph export TN4_6.emf , replace
 
 
********************************************************************************
*Models of Table A.2 (TN's table 5) with sensititivy analyses
*Model Table A.2 (1)
regress log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade investment wgi_coc, vce(robust)
estimates store TN5_1

sensemakr log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade investment wgi_coc, treat(detail)

*Model Table A.2 (1a)
regress log_gdp_cap_ppp_2011 detail amendment_frequency ///
education natural_resources trade investment wgi_coc, vce(robust)
estimates store TN5_1a

sensemakr log_gdp_cap_ppp_2011 detail amendment_frequency ///
education natural_resources trade investment wgi_coc, treat(detail)

*Model Table A.2 (1b)
regress growth detail number_amendments_democracy ///
education natural_resources trade investment wgi_coc, vce(robust)
estimates store TN5_1b

sensemakr growth detail number_amendments_democracy ///
education natural_resources trade investment wgi_coc, treat(detail)

*Model Table A.2 (1c)
regress log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade investment wgi_coc, vce(robust)
estimates store TN5_1c

sensemakr log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade investment wgi_coc, treat(detail)

*Model Table A.2 (2)
regress log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade savings wgi_coc, vce(robust)
estimates store TN5_2

sensemakr log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade savings wgi_coc, treat(detail)

*Model Table A.2 (2a)
regress log_gdp_cap_ppp_2011 detail amendment_frequency ///
education natural_resources trade savings wgi_coc, vce(robust)
estimates store TN5_2a

sensemakr log_gdp_cap_ppp_2011 detail amendment_frequency ///
education natural_resources trade savings wgi_coc, treat(detail)

*Model Table A.2 (2b)
regress growth detail number_amendments_democracy ///
education natural_resources trade savings wgi_coc, vce(robust)
estimates store TN5_2b

sensemakr growth detail number_amendments_democracy ///
education natural_resources trade savings wgi_coc, treat(detail)

*Model Table A.2 (2c)
regress log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade savings wgi_coc, vce(robust)
estimates store TN5_2c

sensemakr log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade savings wgi_coc, treat(detail)

*Model Table A.2 (3)
regress log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade investment corruption_ti_cpi, vce(robust)
estimates store TN5_3

sensemakr log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade investment corruption_ti_cpi, treat(detail)

*Model Table A.2 (3a)
regress log_gdp_cap_ppp_2011 detail amendment_frequency  ///
education natural_resources trade investment corruption_ti_cpi, vce(robust)
estimates store TN5_3a

sensemakr log_gdp_cap_ppp_2011 detail amendment_frequency  ///
education natural_resources trade investment corruption_ti_cpi, treat(detail)

*Model Table A.2 (3b)
regress growth detail number_amendments_democracy ///
education natural_resources trade investment corruption_ti_cpi, vce(robust)
estimates store TN5_3b

sensemakr growth detail number_amendments_democracy ///
education natural_resources trade investment corruption_ti_cpi, treat(detail)

*Model Table A.2 (3c)
regress log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade investment corruption_ti_cpi, vce(robust)
estimates store TN5_3c

sensemakr log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade investment corruption_ti_cpi, treat(detail)

*Model Table A.2 (4)
regress log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade savings corruption_ti_cpi, vce(robust)
estimates store TN5_4

sensemakr log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade savings corruption_ti_cpi, treat (detail)

*Model Table A.2 (4a)
regress log_gdp_cap_ppp_2011 detail amendment_frequency  ///
education natural_resources trade savings corruption_ti_cpi, vce(robust)
estimates store TN5_4a

sensemakr log_gdp_cap_ppp_2011 detail amendment_frequency  ///
education natural_resources trade savings corruption_ti_cpi, treat(detail)

*Model Table A.2 (4b)
regress growth detail number_amendments_democracy ///
education natural_resources trade savings corruption_ti_cpi, vce(robust)
estimates store TN5_4b

sensemakr growth detail number_amendments_democracy ///
education natural_resources trade savings corruption_ti_cpi, treat (detail)

*Model Table A.2 (4c)
regress log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade savings corruption_ti_cpi, vce(robust)
estimates store TN5_4c

sensemakr log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade savings corruption_ti_cpi, treat (detail)

*Model Table A.2 (5)
regress log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade investment government_consumption, vce(robust)
estimates store TN5_5

sensemakr log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade investment government_consumption, treat(detail)

*Model Table A.2 (5a)
regress log_gdp_cap_ppp_2011 detail amendment_frequency  ///
education natural_resources trade investment government_consumption, vce(robust)
estimates store TN5_5a

sensemakr log_gdp_cap_ppp_2011 detail amendment_frequency  ///
education natural_resources trade investment government_consumption, treat(detail)

*Model Table A.2 (5b)
regress growth detail number_amendments_democracy ///
education natural_resources trade investment government_consumption, vce(robust)
estimates store TN5_5b

sensemakr growth detail number_amendments_democracy ///
education natural_resources trade investment government_consumption, treat(detail)

*Model Table A.2 (5c)
regress log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade investment government_consumption, vce(robust)
estimates store TN5_5c

sensemakr log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade investment government_consumption, treat(detail)

*Model Table A.2 (6)
regress log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade savings government_consumption, vce(robust)
estimates store TN5_6

sensemakr log_gdp_cap_ppp_2011 detail number_amendments_democracy ///
education natural_resources trade savings government_consumption, treat(detail)

*Model Table A.2 (6a)
regress log_gdp_cap_ppp_2011 detail amendment_frequency  ///
education natural_resources trade savings government_consumption, vce(robust)
estimates store TN5_6a

sensemakr log_gdp_cap_ppp_2011 detail amendment_frequency  ///
education natural_resources trade savings government_consumption, treat(detail)

*Model Table A.2 (6b)
regress growth detail number_amendments_democracy ///
education natural_resources trade savings government_consumption, vce(robust)
estimates store TN5_6b

sensemakr growth detail number_amendments_democracy ///
education natural_resources trade savings government_consumption, treat(detail)

*Model Table A.2 (6c)
regress log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade savings government_consumption, vce(robust)
estimates store TN5_6c

sensemakr log_gdp_pc_2015_2018 detail amend_1990_2014 ///
education natural_resources trade savings government_consumption, treat(detail)

*Export results"
 etable, column(index) estimates(TN5_1 TN5_1a  TN5_1b TN5_1c TN5_2 TN5_2a TN5_2b TN5_2c TN5_3 TN5_3a TN5_3b TN5_3c) keep(detail number_amendments_democracy amendment_frequency amend_1990_2014) cstat(_r_b, nformat(%5.3f)) cstat(_r_se, nformat(%5.3f)) mstat(r2) showstars showstarsnote export(TN_Table5_p1.docx, replace)
  
 etable, column(index) estimates(TN5_4 TN5_4a TN5_4b TN5_4c TN5_5 TN5_5a TN5_5b TN5_5c TN5_6 TN5_6a TN5_6b TN5_6c) keep(detail number_amendments_democracy amendment_frequency amend_1990_2014) cstat(_r_b, nformat(%5.3f)) cstat(_r_se, nformat(%5.3f)) mstat(r2) showstars showstarsnote export(TN_Table5_p2.docx, replace)

*Coefficient plots for models in table A.2*
 coefplot TN5_1   TN5_1a  TN5_1b TN5_1c, keep(detail number_amendments_democracy ///
 amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
 "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 5 (1)") ///
 note("Controls: education, natural resources, trade openness, investment, corruption (wgi)", span)
  graph export TN5_1.pdf , replace
 graph export TN5_1.emf , replace
 
  coefplot TN5_2   TN5_2a TN5_2b TN5_2c, keep(detail number_amendments_democracy ///
 amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
  "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 5 (2)") ///
 note("Controls: education, natural resources, trade openness, savings, corruption (wgi)", span)
   graph export TN5_2.pdf , replace
 graph export TN5_2.emf , replace
 
  coefplot TN5_3   TN5_3a TN5_3b TN5_3c, keep(detail number_amendments_democracy ///
 amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
  "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 5 (3)") ///
 note("Controls: education, natural resources, trade openness, investment, corruption (cpi)", span)
   graph export TN5_3.pdf , replace
 graph export TN5_3.emf , replace
 
  coefplot TN5_4   TN5_4a TN5_4b TN5_4c, keep(detail number_amendments_democracy ///
 amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
   "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 5 (4)") ///
 note("Controls: education, natural resources, trade openness, savings, corruption (cpi)", span)
   graph export TN5_4.pdf , replace
 graph export TN5_4.emf , replace
 
  coefplot TN5_5   TN5_5a TN5_5b TN5_5c, keep(detail number_amendments_democracy ///
 amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
   "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 5 (5)") ///
 note("Controls: education, natural resources, trade openness, investment, government consumption", span)
   graph export TN5_5.pdf , replace
 graph export TN5_5.emf , replace
 
  coefplot TN5_6   TN5_6a TN5_6b TN5_6c, keep(detail number_amendments_democracy ///
 amendment_frequency soc_trust_wvs) msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with modified control   " "with modified dep. var." ///
   "for period from 1990") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 5 (6)") ///
 note("Controls: education, natural resources, trade openness, savings, government consumption", span)
   graph export TN5_6.pdf , replace
 graph export TN5_6.emf , replace
 
*******************************************************************************
*Models of Table A.3 (TN's table 2) with sensititivy analyses
*Model Table A.3 (1)
regress log_gdp_cap_ppp_2011 log_constitutional_length , vce(robust)
estimates store TN2_1

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length , ///
 treat(log_constitutional_length)

*Model Table A.3 (1a)
regress log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs, ///
vce(robust)
estimates store TN2_1a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs, ///
treat(log_constitutional_length)

*Model Table A.3 (2)
regress log_gdp_cap_ppp_2011 log_constitutional_length education , vce(robust)
estimates store TN2_2

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length education , ///
 treat(log_constitutional_length)

*Model Table A.3 (2a)
regress log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education, vce(robust)
estimates store TN2_2a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education, treat(log_constitutional_length)


*Model Table A.3 (3)
regress log_gdp_cap_ppp_2011 log_constitutional_length education ///
natural_resources , vce(robust)
estimates store TN2_3

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length education ///
natural_resources ,  treat(log_constitutional_length)


*Model Table A.3 (3a)
regress log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education natural_resources, vce(robust)
estimates store TN2_3a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education natural_resources, treat(log_constitutional_length)


*Model Table A.3 (4)
regress log_gdp_cap_ppp_2011 log_constitutional_length education ///
natural_resources trade , vce(robust)
estimates store TN2_4

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length education ///
natural_resources trade ,  treat(log_constitutional_length)

*Model Table A.3 (4a)
regress log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education natural_resources trade, vce(robust)
estimates store TN2_4a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education natural_resources trade, treat(log_constitutional_length)

*Model Table A.3 (5)
regress log_gdp_cap_ppp_2011 log_constitutional_length education ///
natural_resources trade investment , vce(robust)
estimates store TN2_5

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length education ///
natural_resources trade investment , treat(log_constitutional_length)

*Model Table A.3 (5a)
regress log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education natural_resources trade investment, vce(robust)
estimates store TN2_5a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education natural_resources trade investment, treat(log_constitutional_length)

*Model Table A.3 (6)
regress log_gdp_cap_ppp_2011 log_constitutional_length education ///
natural_resources trade savings , vce(robust)
estimates store TN2_6

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length education ///
natural_resources trade savings , treat(log_constitutional_length)

*Model Table A.3 (6a)
regress log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education natural_resources trade savings, vce(robust)
estimates store TN2_6a

sensemakr log_gdp_cap_ppp_2011 log_constitutional_length soc_trust_wvs ///
education natural_resources trade savings, treat(log_constitutional_length)


*Export results"
 etable, column(index) estimates(TN2_1 TN2_1a  TN2_2 TN2_2a TN2_3 TN2_3a ) keep(log_constitutional_length soc_trust_wvs education natural_resources trade savings) cstat(_r_b, nformat(%5.3f)) cstat(_r_se, nformat(%5.3f)) mstat(r2) showstars showstarsnote export(TN_Table2_p1.docx, replace)
  
 etable, column(index) estimates(TN2_4 TN2_4a  TN2_5 TN2_5a  TN2_6 TN2_6a ) keep(log_constitutional_length soc_trust_wvs education natural_resources trade savings) cstat(_r_b, nformat(%5.3f)) cstat(_r_se, nformat(%5.3f)) mstat(r2) showstars showstarsnote export(TN_Table2_p2.docx, replace)

*Coefficient plots for models in table A.3*
 coefplot TN2_1   TN2_1a , keep(log_constitutional_length soc_trust_wvs) ///
 msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with social trust   " ) bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 2 (1)") ///
 note("Controls: none", span)
  graph export TN2_1.pdf , replace
 graph export TN2_1.emf , replace
 
  coefplot TN2_2   TN2_2a , keep(log_constitutional_length soc_trust_wvs ) ///
  msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with social trust   " ) bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 2 (2)") ///
 note("Controls: education", span)
   graph export TN2_2.pdf , replace
 graph export TN2_2.emf , replace
 
  coefplot TN2_3   TN2_3a , keep(log_constitutional_length soc_trust_wvs ) ///
  msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with social trust   ") bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 2 (3)") ///
 note("Controls: education, natural resources", span)
   graph export TN2_3.pdf , replace
 graph export TN2_3.emf , replace
 
  coefplot TN2_4   TN2_4a , keep(log_constitutional_length  soc_trust_wvs) ///
  msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with social trust   " ) bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 2 (4)") ///
 note("Controls: education, natural resources, trade openness", span)
   graph export TN2_4.pdf , replace
 graph export TN2_4.emf , replace
 
  coefplot TN2_5   TN2_5a , keep(log_constitutional_length soc_trust_wvs ) ///
  msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with social trust   " ) bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 2 (5)") ///
 note("Controls: education, natural resources, trade openness, investment", span)
   graph export TN2_5.pdf , replace
 graph export TN2_5.emf , replace
 
  coefplot TN2_6   TN2_6a , keep(log_constitutional_length soc_trust_wvs ) ///
  msize(small)  xline(0, lcolor(black)) ///
 plotlabels("TN original" "with social trust   " ) bgcolor(white) graphregion(c(white)) ///
 subtitle("TN Table 2 (6)") ///
 note("Controls: education, natural resources, trade openness, savings", span)
   graph export TN2_6.pdf , replace
 graph export TN2_6.emf , replace
*******************************************************************************
*Figure A.4*
 graph twoway (lfitci amendment_frequency number_amendments_democracy) ///
 (scatter amendment_frequency number_amendments_democracy)
 scatter amendment_frequency number_amendments_democracy, msize (small) mlabel(abbr) /// 
  mlabsize(small) mlabposition(12) scheme(s2mono) graphregion(fcolor(white) ifcolor(none)) || ///
 lfit amendment_frequency number_amendments_democracy